<template>
  <div class="app-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="支付宝" name="1">
        <alipay-manage v-if="isAlipay"></alipay-manage>
      </el-tab-pane>
      <el-tab-pane label="微信" name="2">
        <wxpay-manage v-if="isWxpay"></wxpay-manage>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import { getAppInfo } from "@/api/shuiyin/shuiyin";
import AlipayManage from './components/alipayManage';
import WxpayManage from './components/wxpayManage';
export default {
  name: 'PayManage',
  components: {
    AlipayManage,
    WxpayManage
  },
  data() {
    return {
      // 支付宝设置显示
      isAlipay: true,
      // 微信设置显示
      isWxpay: false,
      // 选项卡默认选中
      activeName: '1',
    }
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
      this.activeName = tab.name;
      if (tab.name === '1') {
        this.isAlipay = true;
        this.isWxpay = false;
      } else if  (tab.name === '2') {
        this.isWxpay = true;
        this.isAlipay = false;
      }
    }
  }
}
</script>
